package com.tk.method;

public class Demo02 {
    // main 方法
    public static void main(String[] args) {
        System.out.println(f(4));
    }

    public static int f(int a) {
        if (a == 1) {
            return 1;
        } else {
            return a * f(a - 1);
        }
    }
}
